#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5,mod=1e9+7;
int n,m,q,a[N],f[N],g[N],fa[N],vis[N],fl,now;
vector<int> e[N];
struct Question {int x,y,p;}Q[N];
void dfs(int x,int ft) {    
    fa[x]=ft;
    for(auto i:e[x]) {
        if(i==ft) continue;
        dfs(i,x);
    }
}
void init(int x,int p) {
    g[x]=max(f[x],max(p-1,a[x]));
    for(auto i:e[x]) {
        if(i==fa[x]) continue;
        init(i,g[x]-1);
    }
}
void getans(int x) {
    f[x]=g[x];
    for(auto i:e[x]) {
        if(i==fa[x]) continue;
        getans(i);
        f[x]=max(f[x],f[i]-1);
    }
}
void sol(int x,int p,int lst) {
    if(x==now) {
        fl=p+1;
        return ;
    }
    if(p<=0) {
        fl=0;
        return ;
    }
    int Max=p;
    for(int j=1;j<=n;j++) {
        for(auto i:e[x]) {
            if(i==lst) continue;
            init(x,Max);
            getans(x);
            Max=max(Max,f[i]-1);
        }
    }
    sol(fa[x],Max-1,x);
}
signed main() {
    freopen("shu.in","r",stdin);
    freopen("shu.out","w",stdout);
    scanf("%d %d %d",&n,&m,&q);
    for(int i=1;i<n;i++) {
        int x,y;    
        scanf("%d %d",&x,&y);
        e[x].push_back(y);
        e[y].push_back(x);
        a[i]=-1e9;
    }
    for(int i=1;i<=q;i++) 
        scanf("%d %d %d",&Q[i].x,&Q[i].y,&Q[i].p);
    for(int i=1;i<=m;i++) {
        int x,y; scanf("%d %d",&x,&y);
        a[x]=max(a[x],y);
    }
    for(int i=1;i<=q;i++) {
        fl=1;
        for(int j=1;j<=n;j++) f[j]=-1e9,g[j]=1e9;
        dfs(Q[i].y,0); now=Q[i].y;
        sol(Q[i].x,Q[i].p,0);
        if(fl) printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}
/*
5
3 1 4 2 5
3 2 4 1 5
*/
